package com.xdf.whiteaccount.service;
import com.xdf.whiteaccount.entity.ContactCompany;
import com.xdf.whiteaccount.utils.Example;
import com.xdf.whiteaccount.entity.Address;
import java.util.List;
import java.util.Optional;

/**
 * 版本号：20240401
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2025-5-15 9:19:37
 */
public interface AddressService {
    Address insert(Address record);

    Address insertSelective(Address record);

    List<Address> multiInsert(List<Address> list);

    int updateByPrimaryKey(Address record);

    int updateByPrimaryKeySelective(Address record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer id);
    // 根据主键查询
    Address selectByPrimaryKey(Integer id);
    // 根据主键作废
    int setVoid(Integer id);
    // 是明细表则有字段 parent_id
    List<Address> selectByParentId(Integer parentId);

    List<Address> selectAll();

    Address save(Address record);
    List<Address> multiSave(List<Address> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(Address record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default Address fullFill(Address record){
        return record;
    }

    default void doBeforeInsert(Address record){}
    default void doAfterInsert(Address record){}
    List<Address> selectByExample(Example<Address> example);
    Address moveBill(Integer id, String moveBillFlag);
    //=================以上是自动生成的代码，自定义代码请写在下面==================

    List<Address> listQuery(Address record) throws Exception;
}